package com.daichi.yygh.msm.utils;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class MsmUtils implements InitializingBean {

    @Value("${cloopen.serverIp}")
    private String serverIp;

    @Value("${cloopen.serverPort}")
    private String serverPort;

    @Value("${cloopen.accountSId}")
    private String accountSId;

    @Value("${cloopen.accountToken}")
    private String accountToken;

    @Value("${cloopen.appId}")
    private String appId;

    public static String SERVER_IP;

    public static String SERVER_PORT;

    public static String ACCOUNT_SID;

    public static String ACCOUNT_TOKEN;

    public static String APP_ID;

    public static final String SUCCESS_CODE = "000000";

    @Override
    public void afterPropertiesSet() throws Exception {
        SERVER_IP = serverIp;
        SERVER_PORT = serverPort;
        ACCOUNT_SID = accountSId;
        ACCOUNT_TOKEN = accountToken;
        APP_ID = appId;
    }
}
